CC=arm-none-linux-gnueabi-gcc

all : obstacle_function
	mv obstacle_function ../main_function
	
obstacle_function:obstacle_function.o buzzer_dev.o obstacle.o init_daemon.o serial_init.o
	$(CC) obstacle_function.o buzzer_dev.o obstacle.o init_daemon.o serial_init.o -o obstacle_function
	
obstacle_function.o:obstacle_function.c
	$(CC) -g -c obstacle_function.c -o obstacle_function.o -I ../include/
	
buzzer_dev.o:buzzer_dev.c
	$(CC) -g -c buzzer_dev.c -o buzzer_dev.o -I ../include/
	
obstacle.o:obstacle.c
	$(CC) -g -c obstacle.c -o obstacle.o -I ../include/
	
init_daemon.o:init_daemon.c
	$(CC) -g -c init_daemon.c -o init_daemon.o -I ../include/
	
serial_init.o:serial_init.c
	$(CC) -g -c serial_init.c -o serial_init.o -I ../include/
clean:
	rm *.o
